import request from '@/utils/request'

export const getParkPageApi = async (params: any) => {
    return request.get('/park', { params })
}

export const getParkOptionListApi = async () => {
    return request.get('/park/option-list')
}

export const getParkEmptySpaceCntApi = async () => {
    return request.get('/park/empty-space-cnt')
}

export const getParkByIdApi = async (id: string) => {
    return request.get(`/park/${id}`)
}

export const createParkApi = async (data: any) => {
    return request.post('/park', data)
}

export const updateParkApi = async (id: any, data: any) => {
    return request.put(`/park/${id}`, data)
}

export const deleteParkApi = async (id: string) => {
    return request.delete(`/park/${id}`)
}
